package com.gxa.clientarticle.pojo;

/*
 *
 *@author leijun
 *
 *@creating 2020/11/12 9:20
 *
 */

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @ClassName Advert
 * @Description TODO
 * @Author 俊
 * @Date 2020/11/12 9:20
 * @Version 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "tb_advert")
public class Advert implements Serializable {

    @Id
    @Column(name = "ad_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id; //id

    @Column(name = "ad_name")
    private String name; //广告名称

    @Column(name = "ad_location")
    private Integer location; //广告位置

    @Column(name = "ad_startdate")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date startDate; //开始日期

    @Column(name = "ad_enddate")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date endDate; //结束日期

    @Column(name = "ad_link")
    private String link; //广告链接

    @Column(name = "ad_img")
    private String img; //广告图片

    @Column(name = "ad_state")
    private Boolean state; //广告状态

    @Column(name = "ad_sort")
    private String sort; //广告排序
}
